﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<%@ Import Namespace="CRM.Resourses" %>
<%@ Import Namespace="CRM.Models" %>

<%: @Html.DevExpress().Menu(
                        settings=>
                            {
                                settings.Name = "Menu";
                        
                                settings.Items.Add(item =>
                                                       {
                                                          item.SetTextTemplateContent(c=> ViewContext.Writer.Write(Html.ActionLink(Resourses.HomePage,"Index","Home")));
                                                 
                                                       });
                        
                                settings.Items.Add(item =>
                                {
                                    item.SetTextTemplateContent(c=>
                                    {
                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.Customers,"Index","Customers"));
                                    });
                                    
                                    item.Items.Add(_item =>
                                    {
                                        _item.SetTextTemplateContent(c =>
                                        {
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.LegalEntitiesList, "LegalEntitiesList", "Customers"));
                                        });
                                    });
                                    item.Items.Add(_item =>
                                    {
                                        _item.SetTextTemplateContent(c =>
                                        {
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.AllCustomersNames, "AllCustomersNames", "Customers"));
                                        });
                                    });
                                });
                    
                    
                            settings.Items.Add(item =>
                                {
                                    //item.Text = Resourses.Controling;
                                    item.SetTextTemplateContent(c =>
                                    {
                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.Controling, "Index", "Controlling"));
                                    });

                                    item.Items.Add(_item =>
                                    {
                                        _item.Text = Resourses.TurnoversReports;
                                        _item.Items.Add(c =>
                                        {
                                            c.SetTextTemplateContent(qq =>
                                            {
                                                ViewContext.Writer.Write(Html.ActionLink("Umsatz", "Umsatz", "Turnovers"));
                                            });
                                        });
                                        _item.Items.Add(c =>
                                        {
                                            c.SetTextTemplateContent(qq =>
                                            {
                                                ViewContext.Writer.Write(Html.ActionLink("Haendler_P", "Haendler_P", "Turnovers"));
                                            });
                                        });
                                        _item.Items.Add(c =>
                                        {
                                            c.SetTextTemplateContent(qq =>
                                            {
                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.Novices, "Novicies", "Turnovers"));
                                            });
                                        });
                                        _item.Items.Add(c =>
                                        {
                                            c.SetTextTemplateContent(qq =>
                                            {
                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.AllTurnovers, "AllTurnovers", "Turnovers"));
                                            });
                                        });
                                        _item.Items.Add(c =>
                                        {
                                            c.SetTextTemplateContent(qq =>
                                            {
                                                ViewContext.Writer.Write(Html.ActionLink(CRM.Resourses.Resourses.DirectTurnovers, "AllDirectTurnovers", "Turnovers"));
                                            });
                                        });
                                        //_item.Items.Add(c =>
                                        //{
                                        //    c.SetTextTemplateContent(qq =>
                                        //    {
                                        //        ViewContext.Writer.Write("Сравнение по периодам");
                                        //    });
                                        //});
                                    });
                                    
                                    item.Items.Add(_item =>
                                    {
                                        _item.SetTextTemplateContent(qq =>
                                        {
                                            
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.TurnoversLoading, "Index", "Turnovers"));
                                        });
                                    });


                                    item.Items.Add(_item =>
                                    {
                                        _item.SetTextTemplateContent(qq =>
                                        {

                                            ViewContext.Writer.Write(Resourses.Contracts);
                                        });

                                        _item.Items.Add(__item =>
                                                            {
                                                                
                                                                __item.SetTextTemplateContent(qq=>
                                                                                                  {
                                                                                                      ViewContext.Writer.Write(Html.ActionLink(Resourses.Contracts, "Index", "Contracts")); 
                                                                                                  });
                                                            });
                                        _item.Items.Add(__item =>
                                        {

                                            __item.SetTextTemplateContent(qq =>
                                            {
                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.AllConditions, "AllConditions", "Contracts"));
                                            });
                                        });
                                    });
                                });

                            //--------
                            //ОБУЧЕНИЕ
                            //--------
                                     
                            settings.Items.Add(item =>
                            {
                               // item.Text = Resourses.TC;
                                item.SetTextTemplateContent(c =>
                                {
                                  //  ViewContext.Writer.Write(Html.ActionLink(Resourses.TC, "Index", "TC"));
                                  //  ViewContext.Writer.Write("<a href='http://ruw8kap01/cdb/UsersDialogs/Learning/LearningClientsPlanCourses.aspx' target='_blank'>" + Resourses.TC + "</a>");
                                    ViewContext.Writer.Write( Resourses.TC );
                                });

                                item.Items.Add(_item =>
                                {
                                    _item.SetTextTemplateContent(qq =>
                                    {
                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingsCourses, "TrainingsCoursesList", "TC"));
                                    });
                                });

                                item.Items.Add(_item =>
                                {
                                    _item.SetTextTemplateContent(qq =>
                                    {
                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingsSchedules, "TrainingsSchedules", "TC"));
                                    });

                                    _item.Items.Add(__item =>
                                                        {
                                                            __item.SetTextTemplateContent(qq =>
                                                            {
                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingsCalendar, "Scheduler", "TC"));
                                                            });
                                                        });
                                });

                                item.Items.Add(_item =>
                                {
                                    _item.SetTextTemplateContent(qq =>
                                    {
                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingsRequests, "TrainingsRequests", "TC"));
                                    });
                                });

                                item.Items.Add(_item =>
                                {
                                    _item.SetTextTemplateContent(qq =>
                                    {
                                        ViewContext.Writer.Write(Resourses.TrainingsReports);
                                    });

                                    _item.Items.Add(__item =>
                                    {
                                        __item.SetTextTemplateContent(qq =>
                                        {
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingsRequestsReports, "RequestsReports", "TC"));
                                        });
                                    });

                                    _item.Items.Add(__item =>
                                    {
                                        __item.SetTextTemplateContent(qq =>
                                        {
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.RequestsSchedulesReports, "RequestsSchedulesReports", "TC"));
                                        });
                                    });
                                    
                                });
                                ///////////////
                                // Турбокнапка для обучения
                                ///////////////
                                item.Items.Add(c =>
                                {
                                    c.Text =
                                        Resourses.TrainingsDictionaries;
                                    c.Items.Add(cc =>
                                    {
                                        cc.SetTextTemplateContent(qq =>
                                        {
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.Rubrics, "Rubrics", "TC"));
                                        });

                                    });
                                    c.Items.Add(cc =>
                                    {
                                        cc.SetTextTemplateContent(qq =>
                                        {
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingCoursesTypes, "TrainingCoursesTypes", "TC"));
                                        });
                                    });
                                    c.Items.Add(cc =>
                                    {
                                        cc.SetTextTemplateContent(qq =>
                                        {
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingCoursesStatuses, "TrainingCoursesStatuses", "TC"));
                                        });
                                    });
                                    c.Items.Add(cc =>
                                    {
                                        cc.SetTextTemplateContent(qq =>
                                        {
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainigAuditoriums, "TrainingsAuditoriums", "TC"));
                                        });
                                    });
                                    c.Items.Add(cc =>
                                    {
                                        cc.SetTextTemplateContent(qq =>
                                        {
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingRequestsStatuses, "TrainingRequestsStatuses", "TC"));
                                        });
                                    });
                                    c.Items.Add(cc =>
                                    {
                                        cc.SetTextTemplateContent(qq =>
                                        {
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingParticipantsStatuses, "TrainingParticipantsStatuses", "TC"));
                                        });
                                    });

                                    c.Items.Add(cc =>
                                    {
                                        cc.SetTextTemplateContent(qq =>
                                        {
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingsCenters, "TrainingsCenters", "TC"));
                                        });
                                    });

                                    c.Items.Add(cc =>
                                    {
                                        cc.SetTextTemplateContent(qq =>
                                        {
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingsCentersTypes, "TrainingsCentersTypes", "TC"));
                                        });
                                    });

                                    c.Items.Add(cc =>
                                    {
                                        cc.SetTextTemplateContent(qq =>
                                        {
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingsPlaces, "TrainingsPlaces", "TC"));
                                        });
                                    });

                                    c.Items.Add(cc =>
                                    {
                                        cc.SetTextTemplateContent(qq =>
                                        {
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingsTrainers, "TrainingsTrainers", "TC"));
                                        });
                                    });

                                    c.Items.Add(cc =>
                                    {
                                        cc.SetTextTemplateContent(qq =>
                                        {
                                            ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingsCities, "TrainingsCities", "TC"));
                                        });
                                    });

                                });
                            });

                            //--------
                            //ТЕХНИКИ
                            //--------
                            settings.Items.Add(technics =>
                            {
                                technics.Text = Resourses.TD;
                                technics.Items.Add(requestsMenu =>
                                {
                                    requestsMenu.SetTextTemplateContent(requestsItem =>
                                    {
                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.TechnicAllRequests, "TechnicRequests", "TD"));
                                    });
                                });
                                technics.Items.Add(requestsMenu =>
                                {
                                    requestsMenu.SetTextTemplateContent(requestsItem =>
                                    {
                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.TechnicMyRequests, "TechnicMyRequests", "TD"));
                                    });
                                });
                                technics.Items.Add(schedulerMenu =>
                                {
                                    schedulerMenu.SetTextTemplateContent(schedulerItem =>
                                    {
                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.TechnicScheduler, "TechnicScheduler", "TD"));
                                    });
                                });
                                technics.Items.Add(reportsMenu =>
                                {
                                    reportsMenu.SetTextTemplateContent(reportsItem =>
                                    {
                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.TechnicReports, "TechnicReports", "TD"));
                                    });
                                });
                            });
                            //---------------
                            //ТЕХНИКИ - КОНЕЦ
                            //---------------
                            
                            
                            settings.Items.Add(item =>
                            {
                                item.SetTextTemplateContent(c =>
                                {
                                   // ViewContext.Writer.Write(Html.ActionLink(Resourses.OM, "Index", "OM"));
                                    ViewContext.Writer.Write("<a href='http://ruw8kap01/cdb/UsersDialogs/ObjManagement/Objects/Objects.aspx' target='_blank'>" + Resourses.OM + "</a>");
                                });
                        
                            });

                            settings.Items.Add(item =>
                            {
                                item.SetTextTemplateContent(c =>
                                {
                                    //ViewContext.Writer.Write(Html.ActionLinkAuthorized(Resourses.Settings, "Index", "Settings"));
                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.Settings, "Index", "Settings"));
                                });
                                item.Items.Add(_item =>
                                                   {
                                                       _item.Text = Resourses.Dictionaries;
                                                       _item.Items.Add(__item =>
                                                                           {
                                                                               __item.Text = CRM.Resourses.Resourses.General;
                                                                               __item.Items.Add(c =>
                                                                                                    {
                                                                                                        c.Text = Resourses.Geographical;

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                                cc.SetTextTemplateContent(ccc =>
                                                                                                                {
                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.profineRegions, "profineRegions", "Dictionaries"));
                                                                                                                });
                                                                                                                  
                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(ccc =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.Areas, "Areas", "Dictionaries"));
                                                                                                            });

                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.Districts, "Districts", "Dictionaries"));
                                                                                                            });
                                                                                                        });

                                                                                                        //c.Items.Add(cc =>
                                                                                                        //{
                                                                                                        //    cc.SetTextTemplateContent(c_ =>
                                                                                                        //    {
                                                                                                        //        ViewContext.Writer.Write(Html.ActionLink(Resourses.Organisations, "Organisations", "Dictionaries"));
                                                                                                        //    });
                                                                                                        //});

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.Settlements, "Settlements", "Dictionaries"));
                                                                                                            });
                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.Countries, "Countries", "Dictionaries"));
                                                                                                            });
                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.AddressesTypes, "AddressesTypes", "Dictionaries"));
                                                                                                            });
                                                                                                        });
                                                                                                
                                                                                                
                                                                                                    });

                                                                               __item.Items.Add(c =>
                                                                                                    {
                                                                                                        c.Text = Resourses.Customer_;

                                                                                                       
                                                                                                        //убрано по  заявке:
                                                                                                        //c.Items.Add(cc =>
                                                                                                        //{
                                                                                                        //    cc.SetTextTemplateContent(c_ =>
                                                                                                        //    {
                                                                                                        //        ViewContext.Writer.Write(Html.ActionLink(Resourses.CustomerClassifications, "CustomerClassifications", "Dictionaries"));
                                                                                                        //    });
                                                                                                        //});

                                                                                                        //c.Items.Add(cc =>
                                                                                                        //{
                                                                                                        //    cc.SetTextTemplateContent(c_ =>
                                                                                                        //    {
                                                                                                        //        ViewContext.Writer.Write(Html.ActionLink(Resourses.CustomerCategories, "CustomerCategories", "Dictionaries"));
                                                                                                        //    });
                                                                                                        //});

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.CustomerClassificationsProfine, "CustomerClassificationsProfine", "Dictionaries"));
                                                                                                            });
                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.CustomerClassificationsTurnover, "CustomerClassificationsTurnover", "Dictionaries"));
                                                                                                            });
                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.CustomerClassificationsByBusiness, "CustomerClassificationsByBusiness", "Dictionaries"));
                                                                                                            });
                                                                                                        });

                                                                                                        //c.Items.Add(cc =>
                                                                                                        //{
                                                                                                        //    cc.SetTextTemplateContent(c_ =>
                                                                                                        //    {
                                                                                                        //        ViewContext.Writer.Write(Html.ActionLink(Resourses.ActivitiesDirections, "ActivitiesDirections", "Dictionaries"));
                                                                                                        //    });
                                                                                                        //});

                                                                                                      

                                                                                                        //c.Items.Add(cc =>
                                                                                                        //{
                                                                                                        //    cc.SetTextTemplateContent(c_ =>
                                                                                                        //    {
                                                                                                        //        ViewContext.Writer.Write(Html.ActionLink(Resourses.ActivitiesCategories, "ActivitiesCategories", "Dictionaries"));
                                                                                                        //    });
                                                                                                        //});
                                                                                                    });
                                                                       
                                                                      
                                                                      
                                                                      

                                                                      

                                                                      
                                                                       
                                                                           });
                                                       _item.Items.Add(__item =>
                                                                           {
                                                                               __item.Text = CRM.Resourses.Resourses.Special;


                                                                               __item.Items.Add(c =>
                                                                                                    {
                                                                                                        c.Text =
                                                                                                            Resourses.Technical_department;

                                                                                                        c.Items.Add(cc =>
                                                                                                                        {
                                                                                                                            cc.Text = Resourses.Products_;

                                                                                                                            cc.Items.Add(q=>
                                                                                                                                {
                                                                                                                                    q.SetTextTemplateContent(qc =>
                                                                                                                                    {
                                                                                                                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.Colors, "Colors", "Dictionaries"));
                                                                                                                                    });
                                                                                                                                });

                                                                                                                            cc.Items.Add(q =>
                                                                                                                            {
                                                                                                                                q.SetTextTemplateContent(qc =>
                                                                                                                                {
                                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.Geometries, "Geometries", "Dictionaries"));
                                                                                                                                });
                                                                                                                            });

                                                                                                                            cc.Items.Add(q =>
                                                                                                                            {
                                                                                                                                q.SetTextTemplateContent(qc =>
                                                                                                                                {
                                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.ProductGroups, "ProductGroups", "Dictionaries"));
                                                                                                                                });
                                                                                                                            });

                                                                                                                            cc.Items.Add(q =>
                                                                                                                            {
                                                                                                                                q.SetTextTemplateContent(qc =>
                                                                                                                                {
                                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.Products, "Products", "Dictionaries"));
                                                                                                                                });
                                                                                                                            });


                                                                                                                            cc.Items.Add(q =>
                                                                                                                            {
                                                                                                                                q.SetTextTemplateContent(qc =>
                                                                                                                                {
                                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.ProductVendors, "ProductVendors", "Dictionaries"));
                                                                                                                                });
                                                                                                                            });

                                                                                                                            cc.Items.Add(q =>
                                                                                                                            {
                                                                                                                                q.SetTextTemplateContent(qc =>
                                                                                                                                {
                                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.ProductMarks, "ProductMarks", "Dictionaries"));
                                                                                                                                });
                                                                                                                            });

                                                                                                                            cc.Items.Add(q =>
                                                                                                                            {
                                                                                                                                q.SetTextTemplateContent(qc =>
                                                                                                                                {
                                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.ProductSystems, "ProductSystems", "Dictionaries"));
                                                                                                                                });
                                                                                                                            });
                                                                                                                            
                                                                                                                            c.Items.Add(c1 =>
                                                                                                                            {
                                                                                                                                c1.Text =
                                                                                                                                    Resourses.Equipments;

                                                                                                                                c1.Items.Add(q =>
                                                                                                                                {
                                                                                                                                    q.SetTextTemplateContent(qq =>
                                                                                                                                    {
                                                                                                                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.Equipments, "Equipments", "Dictionaries"));
                                                                                                                                    });
                                                                                                                                });

                                                                                                                                c1.Items.Add(q =>
                                                                                                                                {
                                                                                                                                    q.SetTextTemplateContent(qq =>
                                                                                                                                    {
                                                                                                                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.EquipmentTypes, "EquipmentTypes", "Dictionaries"));
                                                                                                                                    });
                                                                                                                                });

                                                                                                                                //c1.Items.Add(q =>
                                                                                                                                //{
                                                                                                                                //    q.SetTextTemplateContent(qq =>
                                                                                                                                //    {
                                                                                                                                //        ViewContext.Writer.Write(Html.ActionLink(Resourses.Tools, "Tools", "Dictionaries"));
                                                                                                                                //    });
                                                                                                                                //});

                                                                                                                                c1.Items.Add(q =>
                                                                                                                                {
                                                                                                                                    q.SetTextTemplateContent(qq =>
                                                                                                                                    {
                                                                                                                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.ToolGroups, "ToolGroups", "Dictionaries"));
                                                                                                                                    });
                                                                                                                                });
                                                                                                                            });
                                                                                                                            
                                                                                                                            c.Items.Add(c1 =>
                                                                                                                            {
                                                                                                                                c1.Text =
                                                                                                                                    Resourses.General;

                                                                                                                                c1.Items.Add(q =>
                                                                                                                                {
                                                                                                                                    q.SetTextTemplateContent(qq =>
                                                                                                                                    {
                                                                                                                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.VisitsTypes, "VisitsTypes", "Dictionaries"));
                                                                                                                                    });
                                                                                                                                });

                                                                                                                                c1.Items.Add(q =>
                                                                                                                                {
                                                                                                                                    q.SetTextTemplateContent(qq =>
                                                                                                                                    {
                                                                                                                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.TechnicRequestStatuses, "TechnicRequestStatuses", "TD"));
                                                                                                                                    });
                                                                                                                                });

                                                                                                                                c1.Items.Add(q =>
                                                                                                                                {
                                                                                                                                    q.SetTextTemplateContent(qq =>
                                                                                                                                    {
                                                                                                                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.FurnitureMark, "FurnitureMarks", "Dictionaries"));
                                                                                                                                    });
                                                                                                                                });

                                                                                                                                c1.Items.Add(q =>
                                                                                                                                {
                                                                                                                                    q.SetTextTemplateContent(qq =>
                                                                                                                                    {
                                                                                                                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.GlassUnitMarks, "GlassUnitMarks", "Dictionaries"));
                                                                                                                                    });
                                                                                                                                });

                                                                                                                                c1.Items.Add(q =>
                                                                                                                                {
                                                                                                                                    q.SetTextTemplateContent(qq =>
                                                                                                                                    {
                                                                                                                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.Vendors, "Vendors", "Dictionaries"));
                                                                                                                                    });
                                                                                                                                });

                                                                                                                                c1.Items.Add(q =>
                                                                                                                                {
                                                                                                                                    q.SetTextTemplateContent(qq =>
                                                                                                                                    {
                                                                                                                                        ViewContext.Writer.Write(Html.ActionLink(Resourses.VendorsTypes, "VendorsTypes", "Dictionaries"));
                                                                                                                                    });
                                                                                                                                });
                                                                                                                            });
                                                                                                                        });
                                                                                                        });


                                                                                                        __item.Items.Add(c =>
                                                                                                        {
                                                                                                            c.Text =
                                                                                                                Resourses.Training_department;
                                                                                                            c.Items.Add(cc =>
                                                                                                            {
                                                                                                                cc.SetTextTemplateContent(qq =>
                                                                                                                {
                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.Rubrics, "Rubrics", "TC"));
                                                                                                                });
                                                                                                                
                                                                                                            });
                                                                                                            c.Items.Add(cc =>
                                                                                                            {
                                                                                                                cc.SetTextTemplateContent(qq =>
                                                                                                                {
                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingCoursesTypes, "TrainingCoursesTypes", "TC"));
                                                                                                                });
                                                                                                            });
                                                                                                            c.Items.Add(cc =>
                                                                                                            {
                                                                                                                cc.SetTextTemplateContent(qq =>
                                                                                                                {
                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingCoursesStatuses, "TrainingCoursesStatuses", "TC"));
                                                                                                                });
                                                                                                            });
                                                                                                            c.Items.Add(cc =>
                                                                                                            {
                                                                                                                cc.SetTextTemplateContent(qq =>
                                                                                                                {
                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainigAuditoriums, "TrainingsAuditoriums", "TC"));
                                                                                                                });
                                                                                                            });
                                                                                                            c.Items.Add(cc =>
                                                                                                            {
                                                                                                                cc.SetTextTemplateContent(qq =>
                                                                                                                {
                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingRequestsStatuses, "TrainingRequestsStatuses", "TC"));
                                                                                                                });
                                                                                                            });
                                                                                                            c.Items.Add(cc =>
                                                                                                            {
                                                                                                                cc.SetTextTemplateContent(qq =>
                                                                                                                {
                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingParticipantsStatuses, "TrainingParticipantsStatuses", "TC"));
                                                                                                                });
                                                                                                            });
                                                                                                            
                                                                                                            c.Items.Add(cc =>
                                                                                                            {
                                                                                                                cc.SetTextTemplateContent(qq =>
                                                                                                                {
                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingsCenters, "TrainingsCenters", "TC"));
                                                                                                                });
                                                                                                            });

                                                                                                            c.Items.Add(cc =>
                                                                                                            {
                                                                                                                cc.SetTextTemplateContent(qq =>
                                                                                                                {
                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingsCentersTypes, "TrainingsCentersTypes", "TC"));
                                                                                                                });
                                                                                                            });
                                                                                                            
                                                                                                            c.Items.Add(cc =>
                                                                                                            {
                                                                                                                cc.SetTextTemplateContent(qq =>
                                                                                                                {
                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingsPlaces, "TrainingsPlaces", "TC"));
                                                                                                                });
                                                                                                            });

                                                                                                            c.Items.Add(cc =>
                                                                                                            {
                                                                                                                cc.SetTextTemplateContent(qq =>
                                                                                                                {
                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingsTrainers, "TrainingsTrainers", "TC"));
                                                                                                                });
                                                                                                            });

                                                                                                            c.Items.Add(cc =>
                                                                                                            {
                                                                                                                cc.SetTextTemplateContent(qq =>
                                                                                                                {
                                                                                                                    ViewContext.Writer.Write(Html.ActionLink(Resourses.TrainingsCities, "TrainingsCities", "TC"));
                                                                                                                });
                                                                                                            });

                                                                                                        });


                                                                               __item.Items.Add(c =>
                                                                                                    {
                                                                                                        c.Text =CRM.Resourses.Resourses.Contracts;

                                                                                                       
                                                                                                         
                                                                                                          c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.OwnershipPatterns, "OwnershipPatterns", "Dictionaries"));
                                                                                                            });  
                                                                                                        });

                                                                                                           c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.ContractsTypes, "ContractsTypes", "Dictionaries"));
                                                                                                            });
                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.ConditionsTypes, "ConditionsTypes", "Dictionaries"));
                                                                                                            });
                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.BonusTypes, "BonusTypes", "Dictionaries"));
                                                                                                            });
                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.CompensationsTypes, "CompensationsTypes", "Dictionaries"));
                                                                                                            });
                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.InternalCourses, "InternalCourses", "Dictionaries"));
                                                                                                            });
                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.TrucksCapacities, "TrucksCapacities", "Dictionaries"));
                                                                                                            });
                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.Units, "Units", "Dictionaries"));
                                                                                                            });
                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.ContractsStatuses, "ContractsStatuses", "Dictionaries"));
                                                                                                            });
                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.ProfineEssentialElements, "ProfineEssentialElements", "Dictionaries"));
                                                                                                            });
                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.CreditTypes, "CreditTypes", "Contracts"));
                                                                                                            });
                                                                                                        });

                                                                                                        c.Items.Add(cc =>
                                                                                                        {
                                                                                                            cc.SetTextTemplateContent(c_ =>
                                                                                                            {
                                                                                                                ViewContext.Writer.Write(Html.ActionLink(Resourses.PriceConditionTypes, "PriceConditionsTypes", "Contracts"));
                                                                                                            });
                                                                                                        });
                                                                                                         
                                                                                                        
                                                                                                    });
                                                                           });
                                                   });
                                //--------------------------------
                                //начало пункта администрирования
                                //--------------------------------
                                if (PermissionsManager.ValidatePermissions("MenuSettings", "MenuAdministration", ViewContext.RequestContext.HttpContext.Request.LogonUserIdentity.Name.ToString()))
                                {
                                    item.Items.Add(administrationMenuItem =>
                                    {
                                        administrationMenuItem.Text = Resourses.Administration;
                                        administrationMenuItem.Items.Add(rolesItem =>
                                        {
                                            rolesItem.SetTextTemplateContent(p => ViewContext.Writer.Write(Html.ActionLink(Resourses.Roles, "Roles", "Dictionaries")));
                                        });
                                        administrationMenuItem.Items.Add(rolesAccessesItem =>
                                        {
                                            rolesAccessesItem.SetTextTemplateContent(p => ViewContext.Writer.Write(Html.ActionLink(Resourses.RolesAccesses, "RolesAccesses", "Dictionaries")));
                                        });
                                        administrationMenuItem.Items.Add(usersInRolesItem =>
                                        {
                                            usersInRolesItem.SetTextTemplateContent(p => ViewContext.Writer.Write(Html.ActionLink(Resourses.UsersInRoles, "UsersInRoles", "Dictionaries")));
                                        });
                                        administrationMenuItem.Items.Add(controllersAndActionsItem =>
                                        {
                                            controllersAndActionsItem.SetTextTemplateContent(p => ViewContext.Writer.Write(Html.ActionLink(Resourses.ControllersAndActions, "ControllersAndActions", "Dictionaries")));
                                        });
                                        administrationMenuItem.Items.Add(rolesTypesItem =>
                                        {
                                            rolesTypesItem.SetTextTemplateContent(p => ViewContext.Writer.Write(Html.ActionLink(Resourses.RolesTypes, "RolesTypes", "Dictionaries")));
                                        });
                                        administrationMenuItem.Items.Add(usersItem =>
                                        {
                                            usersItem.SetTextTemplateContent(p => ViewContext.Writer.Write(Html.ActionLink(Resourses.Users, "Users", "Dictionaries")));
                                        });
                                        administrationMenuItem.Items.Add(usersItem =>
                                        {
                                            usersItem.SetTextTemplateContent(p => ViewContext.Writer.Write(Html.ActionLink(Resourses.Configuration, "Configurations", "Dictionaries")));
                                        });
                                        administrationMenuItem.Items.Add(usersItem =>
                                        {
                                            usersItem.SetTextTemplateContent(p => ViewContext.Writer.Write(Html.ActionLink(Resourses.CustomersManagement, "Index", "CustomersManagement")));
                                        });
                                    });
                                }
                                //--------------------------------
                                //конец пункта администрирования
                                //--------------------------------
                            }
                             

                            
                            );

                            settings.Items.Add(item =>
                            {
                                item.SetTextTemplateContent(c =>
                                {
                                    //ViewContext.Writer.Write("<a href='Content/UserManual.pdf' target='_blank'>" + Resourses.Help + "</a>");
                                    ViewContext.Writer.Write("<a href='/CRM/Content/UserManual.pdf' target='_blank'>" + Resourses.Help + "</a>");
                                  //  ViewContext.Writer.Write("<a href='"+Server.MapPath("/Content/UserManual.pdf")+"' target=')_blank'>" + Resourses.Help + "</a>");
                                   // ViewContext.Writer.Write(Server.MapPath("UserManual.pdf"));
                                });

                            });
                        
                            }).GetHtml() %>